package com.csx.framework.springboot.sample.boot;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.stereotype.Component;

/**
 *  生效时机:
 *      Bean实例化之后，注入属性之前,也就是 setter之前
 *  使用场景:
 *
 * @author cuisongxu
 * @date 2024/2/25 周日 14:32
 */

@Component
public class E5BeanFactoryAware implements BeanFactoryAware {

    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
        System.out.println("顺序11 --- E5BeanFactoryAware#setBeanFactory 在Bean实例化之后,注入属性之前生效，可以拿到 BeanFactory 类型对象 ");
        System.out.println();
    }
}
